/**
 * @Title: InvestInfoMapper.java
 * @Package com.wangwu.week3.dao
 * @Description: (描述该文件做什么)
 * @author Alex Lu
 * @date 2019年9月15日 下午3:45:34
 * @version V1.0
 */
package com.wangwu.week3.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.wangwu.week3.domain.InvestInfo;
import com.wangwu.week3.vo.InvestInfoVo;

/**
 * @ClassName: InvestInfoMapper
 * @Description: (描述这个类的作用)
 * @author Alex Lu
 * @date 2019年9月15日 下午3:45:34
 *
 */
public interface InvestInfoMapper extends BaseMapper<InvestInfo> {
	@Select("SELECT t_invest_info.id AS id,t_invest_info.name AS name,t_invest_info.amount AS amount,t_invest_info.manager AS manager,t_invest_info.content AS content,t_dept.name AS deptName FROM t_invest_info LEFT JOIN t_dept ON t_dept.id = t_invest_info.dept_id ${ew.customSqlSegment}")
	public IPage<InvestInfoVo> selectAllInvestInfoByPageAndParam(IPage<InvestInfoVo> page, @Param("ew") Wrapper<InvestInfoVo> queryWrapper);

	@Select("SELECT t_invest_info.id AS id,t_invest_info.name AS name,t_invest_info.amount AS amount,t_invest_info.manager AS manager,t_invest_info.content AS content,t_dept.name AS deptName FROM t_invest_info LEFT JOIN t_dept ON t_dept.id = t_invest_info.dept_id ${ew.customSqlSegment}")
	InvestInfoVo getOneInvestInfo(@Param("ew") QueryWrapper<InvestInfoVo> queryWrapper);
}
